package com.d0324;

import java.util.Arrays;

public class TestSort{
    public static void main(String[] args) {
        Product p1 = new Product("巧克力",45,1);
        Product p2 = new Product("口红",450,1);
        Product p3 = new Product("衣服",145,3);
        Product p4 = new Product("手机",4555,3);
        Product[] products = new Product[]{p1,p2,p3,p4};

        Arrays.sort(products);

        for (Product prod: products){
            System.out.println(prod);
        }
    }
}
